<?php $this->load->view('tourism/layout/header') ?>
<div class="am-search">
    <ul class="am-cf">
        <li class="r-black">
            <a href="<?php echo site_url('tourism/user/orderList')?>">
                <i class="iconfont icon-zuojiantou"></i>
            </a>
        </li>
        <li class="header-input">
            <p>退款/售后</p>
        </li>
        <li class="header-home">
            <?php $this->load->view('tourism/layout/nav'); ?>
        </li>
    </ul>
</div>
<div class="circuittest-first">
    <div class="all-order">
        <ul id="orders-list-bd" class="am-active">
            <?php foreach($result->result() as $value): ?>
            <li class="order-details">
                <div class="am-addressee am-cf">
                    <div class="am-title am-cf">
                        <span class="check-wrapper"></span>
                        <i><?php echo $value->alias_name ?></i>
                    </div>
                    <a class="exchange" href="javascript:;">
                    <?php if($value->status == 1 && $value->flag == 1): ?>
                        审核中
                    <?php elseif ($value->status == 2 && $value->flag == 2): ?>
                        退款成功
                    <?php elseif ($value->status == 3 && $value->flag == 1): ?>
                        拒绝退款
                    <?php else:?>
                        其它
                    <?php endif ?>
                    </a>
                </div>
                <div class="am-addsee am-cf">
                    <ul>
                        <li class="details-ie">
                            <div class="details am-cf">
                                <div class="products-img">
                                    <a href="javascript:;"><img class="lazy" src="/skins/tourism/images/load.jpg" data-original="<?php echo $this->config->show_image_url($value->goods_image, '300-300'); ?>"></a>
                                </div>
                                <div class="am-midd">
                                    <a href="<?php echo site_url('tourism/refund/details/'.$value->refund_id) ?>" title="<?php echo $value->goods_name ?>"><?php echo $value->goods_name ?></a>
                                    <?php if(!empty($value->attribute_value)): ?>
                                        <div class="fyText">
                                            <?php $attribute =explode(',',$value->attribute_value)?>
                                            <?php foreach($attribute as $val): ?>
                                                <span><?php echo $val ?></span>
                                            <?php endforeach ?>
                                        </div>
                                    <?php endif ?>
                                </div>
                                <div class="am-pic">
                                    <span>￥<?php echo $value->pay_amount ?></span>
                                    <i class="add">x<?php echo $value->number ?></i>
                                </div>
                            </div>
                        </li>
                        <div class="leave-price am-cf">
                            <div class="all-the">退款金额:
                                <p>￥<span><?php echo bcsub(bcmul($value->pay_amount, $value->number, 2), $value->counter_fee, 2); ?></span></p>
                            </div>
                        </div>
                    </ul>
                </div>
            </li>
            <?php endforeach ?>
        </ul>
    </div>
</div>
<?php $this->load->view('tourism/layout/footer') ?>
